package com.lh.controller;

import com.lh.Service.DetailService;
import com.lh.bean.Detail;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.List;

@Controller
@RequestMapping("/detail")
public class DetailController {
    @Resource
    private DetailService detailService;

    @RequestMapping("/detailList1")
    @ResponseBody
    private List<Detail> queryDetailList(){
      List<Detail> detailList = detailService.queryDetailList();
      return  detailList;
    }

    @RequestMapping("/detailList")
    @ResponseBody
    private List<Detail> queryDetailListByBasicId(String good_name){
        List<Detail> detailList = detailService.queryDetailListByBasicId(good_name);
        return detailList;
    }

    @RequestMapping("/detailList2")
    @ResponseBody
    private List<Detail> queryDetailListByBasicId2(String good_name){
        List<Detail> detailList = detailService.queryDetailListByBasicId2(good_name);
        return detailList;
    }

    @RequestMapping("/detailList3")
    @ResponseBody
    private List<Detail> queryDetailListByBasicId3(String good_name){
        List<Detail> detailList = detailService.queryDetailListByBasicId3(good_name);
        return detailList;
    }


}
